package com.achievement.project.system.scoreBackup.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.achievement.project.system.scoreBackup.mapper.ScoreBackupMapper;
import com.achievement.project.system.scoreBackup.domain.ScoreBackup;
import com.achievement.project.system.scoreBackup.service.IScoreBackupService;
import com.achievement.common.utils.text.Convert;

/**
 * 成绩备份Service业务层处理
 *
 * @author zkai
 * @date 2021-05-02
 */
@Service
public class ScoreBackupServiceImpl implements IScoreBackupService
{
    @Autowired
    private ScoreBackupMapper scoreBackupMapper;

    /**
     * 查询成绩备份
     *
     * @param id 成绩备份ID
     * @return 成绩备份
     */
    @Override
    public ScoreBackup selectScoreBackupById(Long id)
    {
        return scoreBackupMapper.selectScoreBackupById(id);
    }

    /**
     * 查询成绩备份列表
     *
     * @param scoreBackup 成绩备份
     * @return 成绩备份
     */
    @Override
    public List<ScoreBackup> selectScoreBackupList(ScoreBackup scoreBackup)
    {
        return scoreBackupMapper.selectScoreBackupList(scoreBackup);
    }

    @Override
    public List<ScoreBackup> selectScoreBackupListForExcel(ScoreBackup scoreBackup)
    {
        return scoreBackupMapper.selectScoreBackupListForExcel(scoreBackup);
    }

    /**
     * 新增成绩备份
     *
     * @param scoreBackup 成绩备份
     * @return 结果
     */
    @Override
    public int insertScoreBackup(ScoreBackup scoreBackup)
    {
        return scoreBackupMapper.insertScoreBackup(scoreBackup);
    }

    /**
     * 修改成绩备份
     *
     * @param scoreBackup 成绩备份
     * @return 结果
     */
    @Override
    public int updateScoreBackup(ScoreBackup scoreBackup)
    {
        return scoreBackupMapper.updateScoreBackup(scoreBackup);
    }

    /**
     * 删除成绩备份对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteScoreBackupByIds(String ids)
    {
        return scoreBackupMapper.deleteScoreBackupByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除成绩备份信息
     *
     * @param id 成绩备份ID
     * @return 结果
     */
    @Override
    public int deleteScoreBackupById(Long id)
    {
        return scoreBackupMapper.deleteScoreBackupById(id);
    }
}
